package com.example;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.io.PrintStream;

@SpringBootApplication()
//mybatis dao文件扫描
@MapperScan("com.example.mapper")
@EnableScheduling
public class DemoApplication {

	static Banner banner = new Banner() {
		@Override
		public void printBanner(Environment environment, Class<?> sourceClass, PrintStream out) {
			out.println("----------This is test-----------");
		}
	};
	public static void main(String[] args) {
		SpringApplication app = new SpringApplication(DemoApplication.class);
		app.setBanner(banner);
		app.run(args);
	}

}
